package com.summer.data.table.column;

import com.summer.data.table.BaseColumn;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author 345480567@qq.com
 */

public class IntegerColumn extends BaseColumn<Integer> {

    public IntegerColumn(String colName) {
        super(colName);
    }

//    public IntegerColumn(String colName, Object entity) {
//        super(colName, entity);
//    }

    @Override
    public void fetchNotNullValue(ResultSet resultSet, Integer index) throws SQLException {
        value = getValue(resultSet, index);
    }

    public static Integer getValue(ResultSet resultSet, Integer index) throws SQLException {
        Integer value = resultSet.getInt(index);
        return value;
    }
}
